package com.meitutest.autoscript.V7;

import android.os.Bundle;
import android.support.test.InstrumentationRegistry;
import android.support.test.uiautomator.UiDevice;
import android.text.TextUtils;


import org.junit.Test;

/**
 * Created by CrystalChen on 2017/12/16.
 */

public class GaoTong_PhotoTest {
    @Test
    public void test01() {
        UiDevice uiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
        V7_GaoTongCameraUtils gaoTongCameraUtils = new V7_GaoTongCameraUtils(uiDevice);
        Bundle b = InstrumentationRegistry.getArguments();
        String peroidStr = b.getString("period");
        String durationStr = b.getString("duration");
        long peroid = 1000;
        long duration = 30000;
        if (!TextUtils.isEmpty(peroidStr)) {
            peroid = Long.parseLong(peroidStr);
        }
        if (!TextUtils.isEmpty(durationStr)) {
            duration = Long.parseLong(durationStr);
        }
        gaoTongCameraUtils.takePhotoStressTest(peroid, duration);

    }
}
